class Animal():

    def __init__(self, name, weight, color):
        self.name = name
        self.weight = weight
        self.color = color

    #  通过  实例化 --> 对象
    #  代表实例化之后的 对象
    #     print(self.name)
    def eat(self, eat_what):
        print('吃{}'.format(eat_what))

    def sleep(self):
        print(self.name)
        self.eat('鱼')
        print('呼呼呼')

    def run(self, run_how):
        print('run:{}'.format(run_how))

    def call(self, call_how):
        print(call_how)


dog = Animal('猫', '18kg', 'black')
dog.sleep()
print(dog.name)
dog.age = 12
# 对象的属性可 后天 添加, 可不在初始化时指定
# print(dir(dog))
print(dog.age)